%This function return the index of variableToFind in vector allVariables, that exsists for construction.
%
%This function return the index of variableToFind in vector allVariables,
%that exsists for construction.
%
%Prototype: [index] = lookForVariableIndex(variableToFind, allVariables)
%
%Input:     variableToFind - Variable to find in vector allVariables
%           allVariables - Vector of all variables
%
%Output:    index - Index of the varible VariableToFind in vector
%                   allVariables

function [ index ] = lookForVariableIndex( variableToFind, allVariables )

found = false;
i = 1;
while ~found || i <= length(allVariables)
   if ~isempty(strfind(allVariables{i},char(variableToFind)))
       found = true;
       index = i;
   end
   i = i + 1;
end

return;

end
